package com.hiultra.common.core.domain.entity;

import com.hiultra.common.annotation.Excel;
import com.hiultra.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import javax.validation.constraints.NotBlank;
import java.util.ArrayList;
import java.util.List;

/**
 * 密集架对象 arc_shelves
 *
 * @author ls
 * @date 2022-07-28
 */
public class ArcShelves extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /**
     * 密集架ID
     */
    private Long shelvesId;

    /**
     * 密集架编码
     */
    @Excel(name = "密集架编码")
    private String shelvesCode;

    /**
     * 密集架名称
     */
    @Excel(name = "密集架名称")
    private String shelvesName;

    /**
     * 密集架端口
     */
    @Excel(name = "密集架端口")
    private Long shelvesPort;

    /**
     * 密集架IP
     */
    @Excel(name = "密集架IP")
    private String shelvesIp;
    /**
     * 上级编码
     */
    @Excel(name = "上级编码")
    private Long parentId;

    /**
     * 库房id
     */
    @Excel(name = "库房id")
    private Long storehouseId;

    /**
     * 级别0-密集架1-列2左右3-节4-层
     */
    @Excel(name = "级别0-密集架1-列2左右3-节4-层")
    private Integer leve;

    /**
     * 列数
     */
    @Excel(name = "列数")
    private Integer columnNum;

    /**
     * 节数
     */
    @Excel(name = "节数")
    private Integer sectionNum;

    /**
     * 层数
     */
    @Excel(name = "层数")
    private Integer layerNum;

    /**
     * 状态
     */
    @Excel(name = "状态")
    private Integer status;

    /**
     * 删除标识
     */
    @Excel(name = "删除标识")
    private Integer delflag;

    /**
     * 所属密集架
     */
    @Excel(name = "所属密集架")
    private Long zshelvesId;

    /**
     * 操作
     */
    @Excel(name = "操作")
    private Long optPort;

    /**
     * 层架标签
     */
    @Excel(name = "层架标签")
    private String rfidCode;

    /** 子菜单 */
    private List<ArcShelves> children = new ArrayList<ArcShelves>();

    public List<ArcShelves> getChildren() {
        return children;
    }

    public void setChildren(List<ArcShelves> children) {
        this.children = children;
    }

    private ArcStorehouse storehouse;

    public Long getParentId() {
        return parentId;
    }

    public void setParentId(Long parentId) {
        this.parentId = parentId;
    }

    public ArcStorehouse getStorehouse() {
        return storehouse;
    }

    public void setStorehouse(ArcStorehouse storehouse) {
        this.storehouse = storehouse;
    }

    public void setShelvesId(Long shelvesId) {
        this.shelvesId = shelvesId;
    }

    public Long getShelvesId() {
        return shelvesId;
    }
    @NotBlank(message = "密集架编号不能为空")
    public void setShelvesCode(String shelvesCode) {
        this.shelvesCode = shelvesCode;
    }

    public String getShelvesCode() {
        return shelvesCode;
    }

    public void setShelvesName(String shelvesName) {
        this.shelvesName = shelvesName;
    }
    @NotBlank(message = "密集架名称不能为空")
    public String getShelvesName() {
        return shelvesName;
    }

    public void setShelvesPort(Long shelvesPort) {
        this.shelvesPort = shelvesPort;
    }

    public Long getShelvesPort() {
        return shelvesPort;
    }

    public void setShelvesIp(String shelvesIp) {
        this.shelvesIp = shelvesIp;
    }

    public String getShelvesIp() {
        return shelvesIp;
    }

    @NotBlank(message = "所属库房不能为空")
    public Long getStorehouseId() {
        return storehouseId;
    }

    public void setStorehouseId(Long storehouseId) {
        this.storehouseId = storehouseId;
    }

    public void setLeve(Integer leve) {
        this.leve = leve;
    }

    public Integer getLeve() {
        return leve;
    }

    public void setColumnNum(Integer columnNum) {
        this.columnNum = columnNum;
    }

    public Integer getColumnNum() {
        return columnNum;
    }

    public void setSectionNum(Integer sectionNum) {
        this.sectionNum = sectionNum;
    }

    public Integer getSectionNum() {
        return sectionNum;
    }

    public void setLayerNum(Integer layerNum) {
        this.layerNum = layerNum;
    }

    public Integer getLayerNum() {
        return layerNum;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Integer getStatus() {
        return status;
    }

    public void setDelflag(Integer delflag) {
        this.delflag = delflag;
    }

    public Integer getDelflag() {
        return delflag;
    }

    public void setZshelvesId(Long zshelvesId) {
        this.zshelvesId = zshelvesId;
    }

    public Long getZshelvesId() {
        return zshelvesId;
    }

    public void setOptPort(Long optPort) {
        this.optPort = optPort;
    }

    public Long getOptPort() {
        return optPort;
    }

    public String getRfidCode() {
        return rfidCode;
    }

    public void setRfidCode(String rfidCode) {
        this.rfidCode = rfidCode;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("shelvesId", getShelvesId())
                .append("parentId", getParentId())
                .append("shelvesCode", getShelvesCode())
                .append("shelvesName", getShelvesName())
                .append("shelvesPort", getShelvesPort())
                .append("shelvesIp", getShelvesIp())
                .append("storehouseId", getStorehouseId())
                .append("leve", getLeve())
                .append("columnNum", getColumnNum())
                .append("sectionNum", getSectionNum())
                .append("layerNum", getLayerNum())
                .append("status", getStatus())
                .append("delflag", getDelflag())
                .append("zshelvesId", getZshelvesId())
                .append("optPort", getOptPort())
                .append("rfidCode", getRfidCode())
                .toString();
    }
}
